<?php

namespace App\Admin\Repositories;

use App\Models\AdminUser as Model;
use Dcat\Admin\Repositories\EloquentRepository;

class AdminUser extends EloquentRepository
{
    /**
     * Model.
     *
     * @var string
     */
    protected $eloquentClass = Model::class;

    public function getOptionList()
    {
        $cityList = $this->eloquentClass::query()->select(['id', 'name'])->get()->toArray();
        $options = [];
        foreach ($cityList as $key => $val) {
            $options[$val['id']] = $val['name'];
        }

        return $options;
    }
}
